Complete Strategies for Term Graph Narrowing
نویسندگان
چکیده
Narrowing is a method for solving equations in the equational theories of term rewriting systems. Unification and rewriting, the central operations in narrowing, are often implemented on graph-like data structures to exploit sharing of common subexpressions. In this paper, we study the completeness of narrowing in graph-based implementations. We show that the well-known condition for the completeness of tree-based narrowing, viz. a normalizing and confluent term rewrite relation, does not suffice. Completeness is restored, however, if the implementing graph rewrite relation is normalizing and confluent. We address basic narrowing and show its completeness for innermost normalizing and confluent graph rewriting. Then we consider the combination of basic narrowing with two strategies for controlling sharing, obtaining minimally collapsing and maximally collapsing basic narrowing. The former is shown to be complete in the presence of innermost normalization and confluence, the latter in the presence of termination and confluence. Maximally collapsing narrowing sometimes speeds up narrowing derivations drastically. Our results on minimally collapsing basic narrowing correct analogous claims by Krishna Rao [Proc. JICSLP’96] which are based on an incomplete version of term graph narrowing.
منابع مشابه
Complete Strategies for Admissible-Graph Collapsing Narrowing
Narrowing constitutes the basis of the operational semantics of modern declarative languages which integrate functional and logic programming paradigms. Efficient implementations of these languages consider first-order terms as graphs. In this paper, we investigate narrowing in the setting of graph rewriting systems. We take the full advantage of graph structures by allowing maximal sharing of ...
متن کاملTerm Graph Narrowing 3
We introduce term graph narrowing as an approach for solving equations by transformations on term graphs. Term graph narrowing combines term graph rewriting with rst-order term uniication. Our main result is that this mechanism is complete for all term rewriting systems over which term graph rewriting is normalizing and connuent. This includes, in particular, all convergent term rewriting syste...
متن کاملSolving Equations by Graph Transformation
We review the concept of term graph narrowing as an approach for solving equations by transformations on term graphs. Term graph narrowing combines term graph rewriting with rst-order term uni cation. This mechanism is complete for all term rewriting systems over which term graph rewriting is normalizing and conuent. This includes, in particular, all convergent term rewriting systems. Completen...
متن کاملUniication, Rewriting, and Narrowing on Term Graphs 1
The concept of graph substitution recently introduced by the authors is applied to term graphs, yielding a uniform framework for uniication, rewriting, and narrowing on term graphs. The notion of substitution allows deenitions of these concepts that are close to the corresponding deenitions in the term world. The rewriting model obtained in this way is equivalent to \collapsed tree rewriting" a...
متن کاملNarrowing Strategies for Arbitrary Canonical Rewrite Systems
Narrowing is a universal unification procedure for equational theories defined by a canonical term rewriting system. In its original form it is extremely inefficient. Therefore, many optimizations have been proposed during the last years. In this paper, we present the narrowing strategies for arbitrary canonical systems in a uniform framework and introduce the new narrowing strategy LSE narrowi...
متن کامل